-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add list of boats alive or dead #6
base: master
Are you sure you want to change the base?
Conversation
alexfauquette
commented
Sep 30, 2019
0dd3748
to
60d599e
Compare
<li | ||
v-for="boat in boatsInfos" | ||
:key="boat.name" | ||
v-bind:class="{sunk: boat.isSunk}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tu peux écrire ça :class=
si tu veux 🙂
https://v1.vuejs.org/guide/syntax.html#Shorthands
} | ||
.boats-liste { | ||
list-style: none; | ||
padding: 100% 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pourquoi 100% ?
}, | ||
computed: { | ||
boatsInfos: function() { | ||
const x = Object.keys(this.boats) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
x => boatsInformation
ca me semble hyper compliqué quand l'objet passé en props a déjà quasiment toutes les infos, on veut forcément l'ordonner?